﻿@model SklepISI.Web.Models.Admin.ProductViewModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "EditProduct";
}

<form class="form-horizontal well" action="EditProduct" method="post">
    <h2>Edycja @Model.Product.Name</h2>
    <div class="control-group">
        @Html.Label("Kategoria")
        @Html.DropDownListFor(x => x.Product.CategoryId, Model.Categories)
    </div>
    <div class="control-group">
        @Html.Label("Nazwa")
        @Html.EditorFor(model => model.Product.Name)
        @Html.ValidationMessageFor(model => model.Product.Name)
    </div>
    <div class="control-group">
        @Html.Label("Cena w zł")
        @Html.EditorFor(model => model.Product.Price)
        @Html.ValidationMessageFor(model => model.Product.Price)
    </div>
    <div class="control-group">
        @Html.EditorFor(model => model.Product.IsAvailable)
        Zaznacz jeżeli dostępny
    </div>
    <div class="control-group">
        @Html.Label("Opis")
        @Html.EditorFor(model => model.Product.Description)
        @Html.ValidationMessageFor(model => model.Product.Description)
    </div>
    <div class="controls-row">  
        @Html.ActionLink("Powrót", "ListProducts", null, new { @class = "btn" })
        <input type="submit" class="btn btn-primary" value="Zapisz"/>
    </div>
</form>
